﻿using SqlSugar;
using System;

namespace AuroraPlugin
{
    public class AP_UserKeys
    {
        [SugarColumn(IsPrimaryKey = true)]
        public Guid guid { get; set; }
        public string plugins { get; set; }
        public bool isbanned { get; set; }
        public string machinecode { get; set; }
    }

    public class AP_Plugins
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public ushort id { get; set; }
        public string name { get; set; }
        public string achikey { get; set; }
        public string filemd5 { get; set; }
        public bool isdrm { get; set; }
    }

    public class WSAT_Code
    {
        [SugarColumn(IsPrimaryKey = true)]
        public string code { get; set; }
    }

    public class Database
    {
        public static SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
        {
            ConnectionString = "SERVER=localhost;port=3306;DATABASE=auroracloud;UID=Aurora; PASSWORD=0sqxGNAXblp2Na7J;",
            DbType = DbType.MySql,//设置数据库类型
            IsAutoCloseConnection = true,//自动释放数据务，如果存在事务，在事务结束后释放
            InitKeyType = InitKeyType.Attribute //从实体特性中读取主键自增列信息
        });
    }
}